﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Field.aspx.cs" Inherits="Whir_System_Module_CommonModel_Field" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>字段管理</title>
    <link href="../../Skin/Default/Css/main.css" rel="stylesheet" type="text/css" />

    <script language="javascript" type="text/javascript">
        if (top.location == self.location) { 
            alert('禁止访问子栏目页！将跳转到默认页面');
            top.location='../../Default.aspx';
        } 
    </script>

</head>
<body>
    <form id="form1" runat="server">
        <table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#DADADA">
            <tr>
                <td height="26" colspan="2" align="left" class="form_title"><strong>
                    <asp:Label ID="lbFormTitle" runat="server" Text="Label"></asp:Label></strong></td>
            </tr>
            <tr>
                <td height="30" align="center" class="form_tdText">数据库字段：</td>
                <td height="30" align="left" class="form_td">
                    <asp:TextBox ID="TxtFieldName" runat="server" MaxLength="15" />
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TxtFieldName"
                        Display="Dynamic" ErrorMessage="数据库字段为英文字符[a-z、A-Z]，不能包含数字！"></asp:RequiredFieldValidator>
                    <asp:RegularExpressionValidator ID="revTxtFieldName" runat="server" ErrorMessage="数据库字段为英文字符[a-z、A-Z]，不能包含数字！"
                        ControlToValidate="TxtFieldName" ValidationExpression="^[a-zA-Z]+$" Display="Dynamic"
                        SetFocusOnError="True" />
                </td>
            </tr>
            <tr>
                <td height="30" align="center" class="form_tdText">字段名称：</td>
                <td height="30" align="left" class="form_td">
                    <asp:TextBox ID="TxtFieldAliax" runat="server" />
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="TxtFieldAliax"
                        ErrorMessage="字段别名可输入汉字、英文字符等！"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td height="30" align="center" class="form_tdText">字段提示：</td>
                <td height="30" align="left" class="form_td">
                    <asp:TextBox ID="TxtTips" runat="server" /><span class="form_desc">该字段的提示信息</span>
                </td>
            </tr>
            <tr>
                <td height="30" align="center" class="form_tdText">字段描述：</td>
                <td height="30" align="left" class="form_td">
                    <asp:TextBox ID="TxtDescription" Width="200" Height="50" runat="server" TextMode="MultiLine"
                        CssClass="input_textArea" />
                </td>
            </tr>
            <tr>
                <td height="30" align="center" class="form_tdText">级别： </td>
                <td height="30" align="left" class="form_td">
                    <asp:RadioButtonList ID="RadioRating" runat="server" RepeatDirection="Horizontal"
                        RepeatLayout="Flow">
                        <asp:ListItem Value="True">自定义</asp:ListItem>
                        <asp:ListItem Value="False" Selected="True">系统</asp:ListItem>
                    </asp:RadioButtonList><span class="form_desc">选择“自定义”：该字段以后可删除；选择“系统”：该字段以后不能删除</span></td>
            </tr>
            <tr>
                <td height="30" align="center" class="form_tdText">是否必填：</td>
                <td height="30" align="left" class="form_td">
                    <asp:RadioButtonList ID="RadlEnableNull" runat="server" RepeatDirection="Horizontal"
                        RepeatLayout="Flow">
                        <asp:ListItem Value="True">是</asp:ListItem>
                        <asp:ListItem Value="False" Selected="True">否</asp:ListItem>
                    </asp:RadioButtonList><span class="form_desc">该字段是否为必填的</span> </td>
            </tr>
            <tr style="display: none;">
                <td height="30" align="center" class="form_tdText">是否使用：</td>
                <td height="30" align="left" class="form_td">
                    <asp:RadioButtonList ID="RadIsUse" runat="server" RepeatDirection="Horizontal" RepeatLayout="Flow">
                        <asp:ListItem Value="True" Selected="True">是</asp:ListItem>
                        <asp:ListItem Value="False">否</asp:ListItem>
                    </asp:RadioButtonList>
                </td>
            </tr>
            <tr>
                <td height="30" align="center" class="form_tdText">此字段的类型：</td>
                <td id="TdFieldType" runat="server" align="left" class="form_td">
                    <table>
                        <tr>
                            <td>
                                <asp:RadioButton ID="RadTextType" Checked="true" Text="单行文本" AutoPostBack="true"
                                    GroupName="RadFieldType" runat="server" OnCheckedChanged="RadlFieldType_SelectedIndexChanged" /></td>
                            <td>
                                <asp:RadioButton ID="RadMultipleTextType" AutoPostBack="true" Text="多行文本" GroupName="RadFieldType"
                                    runat="server" OnCheckedChanged="RadlFieldType_SelectedIndexChanged" /></td>
                            <td>
                                <asp:RadioButton ID="RadMultipleHtmlTextType" AutoPostBack="true" Text="文本编辑器" GroupName="RadFieldType"
                                    runat="server" OnCheckedChanged="RadlFieldType_SelectedIndexChanged" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:RadioButton ID="RadListBoxType" AutoPostBack="true" Text="选项" GroupName="RadFieldType"
                                    runat="server" OnCheckedChanged="RadlFieldType_SelectedIndexChanged" />
                            </td>
                            <td>
                                <asp:RadioButton ID="RadDateTimeType" AutoPostBack="true" Text="日期和时间" GroupName="RadFieldType"
                                    runat="server" OnCheckedChanged="RadlFieldType_SelectedIndexChanged" />
                            </td>
                            <td>
                                <asp:RadioButton ID="RadBoolType" AutoPostBack="true" Text="是/否（复选框）" GroupName="RadFieldType"
                                    runat="server" OnCheckedChanged="RadlFieldType_SelectedIndexChanged" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:RadioButton ID="RadPictureType" AutoPostBack="true" Text="图片" GroupName="RadFieldType"
                                    runat="server" OnCheckedChanged="RadlFieldType_SelectedIndexChanged" />
                            </td>
                            <td>
                                <asp:RadioButton ID="RadFileType" AutoPostBack="true" Text="文件" GroupName="RadFieldType"
                                    runat="server" OnCheckedChanged="RadlFieldType_SelectedIndexChanged" />
                            </td>
                            <td>
                                <asp:RadioButton ID="RadAreaType" AutoPostBack="true" Text="地区" GroupName="RadFieldType"
                                    runat="server" OnCheckedChanged="RadlFieldType_SelectedIndexChanged" />
                            </td>
                        </tr>
                        <tr>
                            <td><asp:RadioButton ID="RadPassWordType" Text="密码文本" AutoPostBack="true"
                                    GroupName="RadFieldType" runat="server" OnCheckedChanged="RadlFieldType_SelectedIndexChanged" /></td>
                            <td>&nbsp;</td>
                            <td>&nbsp;</td>
                        </tr>
                        <tr>
                            <td>
                                <asp:RadioButton ID="RadLinkType" AutoPostBack="true" Text="超链接" GroupName="RadFieldType"
                                    runat="server" OnCheckedChanged="RadlFieldType_SelectedIndexChanged" />
                            </td>
                            <td>
                                <asp:RadioButton ID="RadMoneyType" AutoPostBack="true" Text="货币" GroupName="RadFieldType"
                                    runat="server" OnCheckedChanged="RadlFieldType_SelectedIndexChanged" />
                            </td>
                            <td>
                                <asp:RadioButton ID="RadNumberType" AutoPostBack="true" Text="数字" GroupName="RadFieldType"
                                    runat="server" OnCheckedChanged="RadlFieldType_SelectedIndexChanged" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:RadioButton ID="RadNone" AutoPostBack="true" Text="传参" GroupName="RadFieldType"
                                    runat="server" OnCheckedChanged="RadlFieldType_SelectedIndexChanged" />
                            </td>
                            <td style="display:none;">
                                <asp:RadioButton ID="RadColorType" AutoPostBack="true" Text="颜色代码" GroupName="RadFieldType"
                                    runat="server" OnCheckedChanged="RadlFieldType_SelectedIndexChanged" />
                            </td>
                            <td></td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tbody id="PnlText" visible="false" runat="server">
                <tr>
                    <td height="30" align="center" class="form_tdText">文本框长度：</td>
                    <td height="30" align="left" class="form_td">
                        <asp:TextBox ID="TxtTextSize" runat="server" Text="400"></asp:TextBox>&nbsp; <span
                            style="color: Blue">px &nbsp;例如：500px</span>
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="TxtTextSize"
                            ErrorMessage="请输入正确的数字格式！" ValidationExpression="^\d+$"></asp:RegularExpressionValidator></td>
                </tr>
                <tr>
                    <td height="30" align="center" class="form_tdText">默认值：</td>
                    <td height="30" align="left" class="form_td">
                        <asp:TextBox ID="TxtTextDefaultValue" runat="server" />
                    </td>
                </tr>
            </tbody>
            <tbody id="PnlPassWord" visible="false" runat="server">
                <tr>
                    <td height="30" align="center" class="form_tdText">文本框长度：</td>
                    <td height="30" align="left" class="form_td">
                        <asp:TextBox ID="TextBox1" runat="server" Text="400"></asp:TextBox>&nbsp; <span
                            style="color: Blue">px &nbsp;例如：500px</span>
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator11" runat="server" ControlToValidate="TxtTextSize"
                            ErrorMessage="请输入正确的数字格式！" ValidationExpression="^\d+$"></asp:RegularExpressionValidator></td>
                </tr>
                <tr>
                    <td height="30" align="center" class="form_tdText">默认值：</td>
                    <td height="30" align="left" class="form_td">
                        <asp:TextBox ID="TextBox2" runat="server" />
                    </td>
                </tr>
            </tbody>
            <tbody id="PnlMultiText" visible="false" runat="server">
                <tr>
                    <td height="30" align="center" class="form_tdText">显示的宽度：</td>
                    <td height="30" align="left" class="form_td">
                        <asp:TextBox ID="TxtMultiTextWidth" runat="server" Text="500"></asp:TextBox>&nbsp;
                        <span style="color: Blue">px &nbsp;例如：500px</span>
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ControlToValidate="TxtMultiTextWidth"
                            ErrorMessage="请输入正确的数字格式！" ValidationExpression="^\d+$"></asp:RegularExpressionValidator></td>
                </tr>
                <tr>
                    <td height="30" align="center" class="form_tdText">显示的高度：</td>
                    <td height="30" align="left" class="form_td">
                        <asp:TextBox ID="TxtMultiTextRow" runat="server" Text="80"></asp:TextBox>&nbsp;
                        <span style="color: Blue">px &nbsp;例如：80px</span>&nbsp;
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server" ControlToValidate="TxtMultiTextRow"
                            ErrorMessage="请输入正确的数字格式！" ValidationExpression="^\d+$"></asp:RegularExpressionValidator>
                    </td>
                </tr>
                <tr>
                    <td height="30" align="center" class="form_tdText">默认值：</td>
                    <td height="30" align="left" class="form_td">
                        <asp:TextBox ID="TxtMultiDefault" runat="server" />
                    </td>
                </tr>
            </tbody>
            <tbody id="PnlEditor" visible="false" runat="server">
                <tr style="display: none;">
                    <td height="30" align="center" class="form_tdText">编辑器类别：</td>
                    <td height="30" align="left" class="form_td">
                        <asp:DropDownList ID="DropEditorType" runat="server" CssClass="select_default">
                            <asp:ListItem Value="1" Selected="True">FckEditor</asp:ListItem>
                            <asp:ListItem Value="2">eWebEditor</asp:ListItem>
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr style="display: none;">
                    <td height="30" align="center" class="form_tdText">编辑器类型：</td>
                    <td height="30" align="left" class="form_td">
                        <asp:DropDownList ID="DropEditorModel" runat="server" CssClass="select_default">
                            <asp:ListItem Value="1" Selected="True">简洁型编辑器</asp:ListItem>
                            <asp:ListItem Value="2">标准型编辑器</asp:ListItem>
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td height="30" align="center" class="form_tdText">编辑器大小设置：</td>
                    <td height="30" align="left" class="form_td">编辑器宽度<asp:TextBox ID="TxtEditorWidth"
                        runat="server" Text="600"></asp:TextBox>
                        <span style="color: Blue">px&nbsp;例如：600px</span>&nbsp;
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator4" runat="server" ControlToValidate="TxtEditorWidth"
                            ErrorMessage="请输入正确的数字格式！" ValidationExpression="^\d+$"></asp:RegularExpressionValidator>
                        <br />
                        编辑器高度<asp:TextBox ID="TxtEditorHight" runat="server" Text="350" />
                        <span style="color: Blue">px&nbsp;例如：350px</span>&nbsp;
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator5" runat="server" ControlToValidate="TxtEditorHight"
                            ErrorMessage="请输入正确的数字格式！" ValidationExpression="^\d+$"></asp:RegularExpressionValidator>
                    </td>
                </tr>
                <tr>
                    <td height="30" align="center" class="form_tdText">默认值：</td>
                    <td height="30" align="left" class="form_td">
                        <asp:TextBox ID="TxtMulitHtmlDefault" runat="server" />
                    </td>
                </tr>
            </tbody>
            <tbody id="PnlChoice" visible="false" runat="server">
                <tr>
                    <td height="30" align="center" class="form_tdText">绑定类型</td>
                    <td height="30" align="left" class="form_td">
                        <asp:RadioButton ID="rbText" runat="server" GroupName="ChoiceType" Checked="true"
                            Text="绑定文本" AutoPostBack="True" OnCheckedChanged="rbText_CheckedChanged" />
                        <asp:RadioButton ID="rbSql" runat="server" GroupName="ChoiceType" Text="绑定 SQL" AutoPostBack="True"
                            OnCheckedChanged="rbSql_CheckedChanged" />
                        <asp:RadioButton ID="rbSql2" runat="server" GroupName="ChoiceType" Text="绑定多级类别"
                            AutoPostBack="True" OnCheckedChanged="rbSql2_CheckedChanged" />
                        <asp:RadioButton ID="rbSql3" runat="server" GroupName="ChoiceType" Text="动态绑定类别"
                            AutoPostBack="True" OnCheckedChanged="rbSql3_CheckedChanged" />
                    </td>
                </tr>
                <tr id="div1" runat="server">
                    <td height="30" align="center" class="form_tdText">绑定文本：</td>
                    <td height="30" align="left" class="form_td">

                        <script type="text/javascript">
                    function AddUrl(){
                      var thisurl='选项名称'+(document.getElementById("<%= ChoiceUrl.ClientID %>").length+1)+'|选项值'; 
                      var url=prompt('请输入选项名称和对应的值，中间用“|”隔开：',thisurl);
                      if(url!=null&&url!=''){document.getElementById("<%= ChoiceUrl.ClientID %>").options[document.getElementById("<%= ChoiceUrl.ClientID %>").length]=new Option(url,url);}
                    }
                    function ModifyUrl(){
                      if(document.getElementById("<%= ChoiceUrl.ClientID %>").length==0) return false;
                      var thisurl=document.getElementById("<%= ChoiceUrl.ClientID %>").value; 
                      if (thisurl=='') {alert('请先选择一个选项，再点修改按钮！');return false;}
                      var url=prompt('请输入选项名称和值，中间用“|”隔开：',thisurl);
                      if(url!=thisurl&&url!=null&&url!=''){document.getElementById("<%= ChoiceUrl.ClientID %>").options[document.getElementById("<%= ChoiceUrl.ClientID %>").selectedIndex]=new Option(url,url);}
                    }
                    function DelUrl(){
                      if(document.getElementById("<%= ChoiceUrl.ClientID %>").length==0) return false;
                      var thisurl=document.getElementById("<%= ChoiceUrl.ClientID %>").value; 
                      if (thisurl=='') {alert('请先选择一个选项，再点删除按钮！');return false;}
                      document.getElementById("<%= ChoiceUrl.ClientID %>").options[document.getElementById("<%= ChoiceUrl.ClientID %>").selectedIndex]=null;
                    }
                    
                    function ChangeHiddenFieldValue()
                    {
                        var obj = document.getElementById("<%= HdnChoiceUrls.ClientID %>");
                        var choiceUrl = document.getElementById("<%= ChoiceUrl.ClientID %>");
                        var Default=document.getElementById('<%=TxtChoiceDefaultValue.ClientID %>').value;
                        var bFoundMatchWithDefault = false;
                        
                        var bindText = document.getElementById("<%= rbText.ClientID %>");
                        var bindSql = document.getElementById("<%= rbSql.ClientID %>");                        
                      
                        var value = "";
                        if(bindText.checked && choiceUrl.length < 1){
                            alert("请添加选项！");
                            return false;
                        }
                        
                        for(i=0;i<choiceUrl.length;i++){
                            if(value!=""){
                                value = value+ ",";
                            }
                            value = value + choiceUrl.options[i].value;
                            if (Default == choiceUrl.options[i].value.split("|")[1]){
                                bFoundMatchWithDefault = true;              
                            }            
                        }
                        obj.value = value;
                        
                        if(Default && !bFoundMatchWithDefault && bindText.checked){
                            alert("“选项”域的默认值必须从指定的选项中选择。请再试一次。");
                            return false;
                        }else{
                            obj.value = value;
                            return true;
                        }
        
                        return true;
                    }

                        </script>

                        <table border="0" cellpadding="0" cellspacing="0">
                            <tr>
                                <td>
                                    <asp:HiddenField ID="HdnChoiceUrls" runat="server" />
                                    <select id="ChoiceUrl" runat="server" style="width: 350px; height: 100px" size="2"
                                        ondblclick="return ModifyUrl();">
                                    </select>
                                </td>
                                <td>
                                    <input type="button" name="addurl" value="添加选项    " onclick="AddUrl();" /><br />
                                    <input type="button" name="modifyurl" value="修改当前选项" onclick="return ModifyUrl();" /><br />
                                    <input type="button" name="delurl" value="删除当前选项" onclick="DelUrl();" />
                                </td>
                            </tr>
                            <tr>
                                <td colspan="2"><span style="color: Blue">格式是</span>：显示的数据|保存到数据库中的数据 </td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr id="div2" runat="server" visible="false">
                    <td height="30" align="center" class="form_tdText">绑定 SQL：</td>
                    <td height="30" align="left" class="form_td">
                        <table border="0" cellpadding="0" cellspacing="0">
                            <tr>
                                <td>绑定的 SQL 脚本： </td>
                                <td>
                                    <asp:TextBox ID="txtSQL" runat="server" Width="400"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td>绑定的文本字段： </td>
                                <td>
                                    <asp:TextBox ID="txtSQLTextField" runat="server" Text="CategoryName"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td>绑定的值字段： </td>
                                <td>
                                    <asp:TextBox ID="txtSQLValueField" runat="server" Text="CategoryId"></asp:TextBox>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr id="div3" runat="server" visible="false">
                    <td height="30" align="center" class="form_tdText">绑定多级类别：</td>
                    <td height="30" align="left" class="form_td">
                        <table border="0" cellpadding="0" cellspacing="0">
                            <tr>
                                <td>绑定的表名： </td>
                                <td>
                                    <asp:TextBox ID="txtSQL2TableName" runat="server" Text="Whir_CommonCategory"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td>绑定的父级ID： </td>
                                <td>
                                    <asp:TextBox ID="txtSQL2ParentID" runat="server" Text="0"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td>绑定的文本字段： </td>
                                <td>
                                    <asp:TextBox ID="txtSQL2TextField" runat="server" Text="CategoryName"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td>绑定的值字段： </td>
                                <td>
                                    <asp:TextBox ID="txtSQL2ValueField" runat="server" Text="CategoryId"></asp:TextBox>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr id="div4" runat="server" visible="false">
                    <td height="30" align="center" class="form_tdText">动态绑定类别：</td>
                    <td height="30" align="left" class="form_td">
                        <table border="0" cellpadding="0" cellspacing="0">
                            <tr>
                                <td>绑定的表名： </td>
                                <td>
                                    <asp:TextBox ID="txtSQL3TableName" runat="server" Text="Whir_CommonCategory"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td>绑定规则： </td>
                                <td valign="top">
                                    <asp:TextBox ID="txtSQL3ParentID" runat="server" Text="0=0" TextMode="MultiLine" Rows="5" Width="150px"></asp:TextBox>
                                    <span class="form_desc" style="font-size:11px; height: 90px; vertical-align:top;">格式：栏目编号=类别父级编号,规则之间用换行分割。</span>
                                </td>
                            </tr>
                            <tr>
                                <td>绑定的文本字段： </td>
                                <td>
                                    <asp:TextBox ID="txtSQL3TextField" runat="server" Text="CategoryName"></asp:TextBox>
                                </td>
                            </tr>
                            <tr>
                                <td>绑定的值字段： </td>
                                <td>
                                    <asp:TextBox ID="txtSQL3ValueField" runat="server" Text="CategoryId"></asp:TextBox>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
                <tr>
                    <td height="30" align="center" class="form_tdText">显示选项使用：</td>
                    <td height="30" align="left" class="form_td">
                        <asp:RadioButtonList ID="RadlChoiceType" runat="server" RepeatDirection="Horizontal">
                            <asp:ListItem Value="1" Selected="True">下拉列表框</asp:ListItem>
                            <asp:ListItem Value="2">单选按钮组</asp:ListItem>
                            <asp:ListItem Value="3">多选按钮组</asp:ListItem>
                            <asp:ListItem Value="4">下拉列表框(二级联动)</asp:ListItem>
                        </asp:RadioButtonList>
                    </td>
                </tr>
                <tr>
                    <td height="30" align="center" class="form_tdText">默认值：</td>
                    <td height="30" align="left" class="form_td">
                        <asp:TextBox ID="TxtChoiceDefaultValue" runat="server" />
                    </td>
                </tr>
                <tr>
                    <td height="30" align="center" class="form_tdText">每行显示项数：</td>
                    <td height="30" align="left" class="form_td">
                        <asp:TextBox ID="TxtRepeatColumns" Text="1" runat="server" />
                        <span style="color: Blue">只当类型为单选按钮或复选框时起作用</span>&nbsp;
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator6" runat="server" ControlToValidate="TxtRepeatColumns"
                            ErrorMessage="请输入正确的数字格式！" ValidationExpression="^\d+$"></asp:RegularExpressionValidator></td>
                </tr>
            </tbody>
            <tbody id="PnlNumber" visible="false" runat="server">
                <tr>
                    <td height="30" align="center" class="form_tdText">默认值：</td>
                    <td height="30" align="left" class="form_td">
                        <asp:TextBox ID="TxtNumberDefaultValue" runat="server"></asp:TextBox>&nbsp; </td>
                </tr>
            </tbody>
            <tbody id="PnlCurrency" visible="false" runat="server">
                <tr>
                    <td height="30" align="center" class="form_tdText">默认值：</td>
                    <td height="30" align="left" class="form_td">
                        <asp:TextBox ID="TxtCurrencyDefaultValue" runat="server"></asp:TextBox>&nbsp; </td>
                </tr>
            </tbody>
            <tbody id="PnlDateTime" visible="false" runat="server">
                <tr>
                    <td height="30" align="center" class="form_tdText">日期和时间格式：</td>
                    <td height="30" align="left" class="form_td">
                        <asp:RadioButtonList ID="RadioDateTimeType" runat="server" RepeatDirection="Horizontal">
                            <asp:ListItem Value="0">类似2008-08-08的时间格式</asp:ListItem>
                            <asp:ListItem Value="1" Selected="True">类似2008-08-08 08:08:08的时间格式</asp:ListItem>
                        </asp:RadioButtonList>
                    </td>
                </tr>
                <tr style="display: none;">
                    <td height="30" align="center" class="form_tdText">宽</td>
                    <td height="30" align="left" class="form_td">
                        <asp:TextBox ID="txtDateTimeType" runat="server" Text="200"></asp:TextBox>
                        <span style="color: Blue">px &nbsp;例如：100px</span>&nbsp;
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator7" runat="server" ControlToValidate="txtDateTimeType"
                            ErrorMessage="请输入正确的数字格式！" ValidationExpression="^\d+$"></asp:RegularExpressionValidator></td>
                </tr>
                <tr>
                    <td height="30" align="center" class="form_tdText">默认值：</td>
                    <td height="30" align="left" class="form_td">
                        <table cellpadding="0" cellspacing="0">
                            <tr>
                                <td>
                                    <asp:RadioButtonList ID="RadlDateTimeDefaultType" runat="server">
                                        <asp:ListItem Value="0">无</asp:ListItem>
                                        <asp:ListItem Value="1" Selected="True"><span onclick="changedatetime(1);">当前时间</span></asp:ListItem>
                                        <asp:ListItem Value="2"><span onclick="changedatetime(2);">指定日期</span></asp:ListItem>
                                    </asp:RadioButtonList>
                                </td>
                                <td>
                                    <div style="margin-top: 45px; display: none;" id="divDefaultDate">
                                        <asp:TextBox ID="DateTimeDefaultDate" runat="server" Width="200px" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})"></asp:TextBox>
                                    </div>
                                </td>
                            </tr>
                        </table>
                    </td>
                </tr>
            </tbody>
            <tbody id="PnlURL" visible="false" runat="server">
                <tr>
                    <td height="30" align="center" class="form_tdText">文本框长度：</td>
                    <td height="30" align="left" class="form_td">
                        <asp:TextBox ID="TxtURLSize" runat="server">400</asp:TextBox>
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator8" runat="server" ControlToValidate="TxtURLSize"
                            ErrorMessage="请输入正确的数字格式！" ValidationExpression="^\d+$"></asp:RegularExpressionValidator>
                    </td>
                </tr>
                <tr>
                    <td height="30" align="center" class="form_tdText">默认值：</td>
                    <td height="30" align="left" class="form_td">
                        <asp:TextBox ID="TxtURLDefaultValue" runat="server"></asp:TextBox>
                        <span style="color: Blue">例：http://127.0.0.1/&nbsp;</span> </td>
                </tr>
            </tbody>
            <tbody id="PnlBoolean" visible="false" runat="server">
                <tr>
                    <td height="30" align="center" class="form_tdText">默认值：</td>
                    <td height="30" align="left" class="form_td">
                        <asp:DropDownList ID="DropBoolean" runat="server">
                            <asp:ListItem Value="是">是</asp:ListItem>
                            <asp:ListItem Value="否" Selected="True">否</asp:ListItem>
                        </asp:DropDownList>
                    </td>
                </tr>
            </tbody>
            <tbody id="PnlImage" visible="false" runat="server">
                <tr class="tdbg" id="ImageSize">
                    <td height="30" align="center" class="form_tdText">允许的图片大小：</td>
                    <td height="30" align="left" class="form_td">
                        <asp:TextBox ID="TxtImageSize" runat="server" Text="4096"></asp:TextBox>
                        KB <span style="color: Blue">提示：1 KB = 1024 Byte，1 MB = 1024 KB</span>&nbsp;
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator9" runat="server" ControlToValidate="TxtImageSize"
                            ErrorMessage="请输入正确的数字格式！" ValidationExpression="^\d+$"></asp:RegularExpressionValidator></td>
                </tr>
                <tr class="tdbg" id="ImageType">
                    <td height="30" align="center" class="form_tdText">允许的图片类型：</td>
                    <td height="30" align="left" class="form_td">
                        <asp:TextBox ID="TextImageType" runat="server" Columns="30" Text="gif|jpg|jpeg|png|bmp" />
                        <span style="color: Blue">注：允许多个类型请用“|”号分割，如：gif|jpg|jpeg|png|bmp等等</span> </td>
                </tr>
                <tr class="tdbg" id="PicDefaultUrl">
                    <td height="30" align="center" class="form_tdText">默认图片：</td>
                    <td height="30" align="left" class="form_td">
                        <asp:TextBox ID="TxtPicDefaultUrl" runat="server" />
                        <br />
                        <span style="color: Blue">例：http://www.example.com/images/example.jpg</span> </td>
                </tr>
            </tbody>
            <tbody id="PnlFile" visible="false" runat="server">
                <tr>
                    <td height="30" align="center" class="form_tdText">允许的文件大小：</td>
                    <td height="30" align="left" class="form_td">
                        <asp:TextBox ID="TxtFileSize" runat="server" Text="4096"></asp:TextBox>
                        KB <span style="color: Blue">提示：1 KB = 1024 Byte，1 MB = 1024 KB</span>&nbsp;
                        <asp:RegularExpressionValidator ID="RegularExpressionValidator10" runat="server"
                            ControlToValidate="TxtFileSize" ErrorMessage="请输入正确的数字格式！" ValidationExpression="^\d+$"></asp:RegularExpressionValidator></td>
                </tr>
                <tr>
                    <td height="30" align="center" class="form_tdText">允许的文件类型：</td>
                    <td height="30" align="left" class="form_td">
                        <asp:TextBox ID="TextFileType" runat="server" Text="gif|jpg|jpeg|png|bmp|doc|xls|zip|rar|7z" />
                        <span style="color: Blue">注：允许多个类型请用“|”号分割，如：gif|jpg|jpeg|png|bmp|doc|xls|zip|rar|7z等等</span>
                    </td>
                </tr>
                <tr>
                    <td height="30" align="center" class="form_tdText">默认值：</td>
                    <td height="30" align="left" class="form_td">
                        <asp:TextBox ID="TxtFileDefaultValue" runat="server" Width="349px" />
                        <br />
                        <span style="color: Blue">例：http://www.example.com/files/example.zip</span> </td>
                </tr>
            </tbody>
            <tbody id="PnlColor" visible="false" runat="server">
                <tr>
                    <td height="30" align="center" class="form_tdText">默认颜色值：</td>
                    <td height="30" align="left" class="form_td">
                        <whir:ezColorSelect ID="EzColorSelect1" runat="server" />
                    </td>
                </tr>
            </tbody>
            <tbody id="PnlNone" visible="false" runat="server">
                <tr>
                    <td height="30" align="center" class="form_tdText">参数值：</td>
                    <td height="30" align="left" class="form_td">
                        <asp:TextBox ID="txtParam" runat="server" Text="@TypeID"></asp:TextBox>&nbsp; </td>
                </tr>
            </tbody>
            <tbody id="PnlArea" visible="false" runat="server">
                <tr>
                    <td height="30" align="center" class="form_tdText">地区设置：</td>
                    <td height="30" align="left" class="form_td"></td>
                </tr>
            </tbody>
            <tr class="tdbgbottom">
                <td height="30" align="left" class="form_tdText"></td>
                <td height="30" align="left" class="form_td">
                    <asp:Button ID="btnSubmit" Text="提交" OnClick="btnSubmit_Click" runat="server" CssClass="btn_default" />
                    &nbsp;&nbsp;
                    <asp:Button ID="btnCancel" runat="server" Text="返回" CssClass="btn_default" CausesValidation="False"
                        OnClick="btnCancel_Click" />
                    <asp:HiddenField ID="HdnFieldType" runat="server" />
                </td>
            </tr>
        </table>
    </form>
</body>
</html>

<script language="javascript" type="text/javascript">    
   //字段的时间类型
   function changedatetime(id){
        if(id == 1){
            document.getElementById("divDefaultDate").style.display  = "none";
            document.getElementById("divDefaultDate").value="";
        }else{
            document.getElementById("divDefaultDate").style.display  = "";
        }
   }
</script>

<script language="javascript" src="../../UserControls/My97DatePicker/WdatePicker.js"
    type="text/javascript"></script>

<!-- 文本框的样式初始化-->

<script language="javascript" src="../../Js/common.js"></script>

<script type="text/javascript">initAutoFormStyle();</script>

